package com.example.jdai.jdai.util;

import android.content.Context;
import android.content.SharedPreferences;

import com.example.jdai.jdai.MyApplication;
import com.example.jdai.jdai.config.Config;

/**
 * Created by hellopyj on 2017/1/13.
 */

public class DataJd extends BaseData {
    public static String BT="BT";
    public static String BT_NAME=BT+"_name";
    public static String BT_PWD=BT+"_pwd";
    public static String BT_STATUS=BT+"_status";
    public DataJd(){
        count=3;
        SharedPreferences sp= MyApplication.applicationContext.getSharedPreferences(Config.SP_NAME, Context.CONTEXT_RESTRICTED);
        data.put(BT_NAME,sp.getString(BT_NAME,""));
        data.put(BT_PWD,sp.getString(BT_PWD,""));
        data.put(BT_STATUS,sp.getString(BT_STATUS,""));
    }
    public boolean saveAll()
    {
        super.saveAll();
        return dataCheck();
    }

}
